﻿using AutoCode.Model.DataModel;
using AutoCode.Model.MarkAttribute;
namespace SourceGeneratorApp.InterfaceGenerator
{
    //[AutoInterface("IDataCenterV5","/")]
    [AutoInterface]
    public class DataCenter
      : IDataCenter
    {
        [AutoIgnore]
        public int QueryCurrentDay(DateTime dateTime)
        {
            return dateTime.Day;
        }

        /// <summary>
        /// 获取当前年份
        /// </summary>
        /// <returns></returns>
        public int QueryCurrentYear()
        {
            return DateTime.Now.Year;
        }

        public int QueryCurrentMonth()
        {
            return DateTime.Now.Month;
        }


        public Data_Time QueryTimeNow()
        {
            return new Data_Time()
            {
                Year = QueryCurrentYear(),
                Month = QueryCurrentMonth(),
                Day = DateTime.Now.Day,
            };
        }
    }
}
